﻿<!--#include file="../../Inc/Const.Asp"-->
<%
Dim Plus
Set Plus = New Cls_Plus
Plus.Open("comment") ' 打开配置文件
Dim Aid,Rs,SQL
aid = Request("id")
If Len(aid)=0 Or Not IsNumeric(aid) Or Len(aid)>8 Then Response.Write "document.write('" & Plus.Lang("iderr") & "')'" : Set Plus = Nothing : Response.End
SQL = "select top " & Plus.Config("topn") & " [User],[IP],[Time],[Content],[ReComment] From [{pre}Comment] Where [Aid]=" & aid & " And [State]=1 Order by [ID] desc"
Set Rs = DB(SQL,1)
Dim Poster,Repost,UserIP
Poster = Plus.Lang("js-poster")
Repost = Plus.Lang("js-repost")
Do While Not Rs.Eof
UserIP = Split(Rs(1),".")
%>
document.write("<dl>");
<%if ubound(userip)>=2 then%>
document.write("<dt><strong><%=Rs(0)%>(<%=UserIP(0)%>.<%=UserIP(1)%>.<%=UserIP(2)%>.*) </strong><%=Poster%><span><%=Server.htmlencode(Rs(2))%></span></dt>");
<%else%>
document.write("<dt><strong><%=Rs(0)%>(0)%> </strong><%=Poster%><span><%=Server.htmlencode(Rs(2))%></span></dt>");
<%end if%>
document.write("<dd><%=Replace(Replace(Rs(3),Vbcrlf,""),"""","\""")%><br/>");
<%If Len(Rs(4))>0 Then%>document.write("<%=Repost%><font color=red><%=Replace(Replace(Rs(4),Vbcrlf,""),"""","\""")%></font>");<%End If%>
document.write("</dd>");
document.write("</dl>");
<%
Rs.moveNext
Loop
Rs.Close
Conn.Close
Set Plus = Nothing
Set Rs = Nothing
Set Conn = Nothing
%>